package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Sign;
import cn.wolfcode.trip.base.mapper.SignMapper;
import cn.wolfcode.trip.base.service.ISignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author by mycp
 * @Classname SignServiceImpl
 * @Description TODO
 * @Date 2018/11/13 21:40
 */
@Service
public class SignServiceImpl implements ISignService {
    @Autowired
    private SignMapper signMapper;

    @Override
    public Sign getSignByUserId(Long userId) {
        return signMapper.getSignByUserId(userId);
    }

    @Override
    public void saveSign(Sign sign) {
        signMapper.insert(sign);
    }

    @Override
    public void updateSignByUserId(Sign userSign) {
        signMapper.updateByPrimaryKey(userSign);
    }

    @Override
    public Sign getCreditsByUserId(Long userId) {
        return signMapper.getSignByUserId(userId);
    }


}
